'use strict'

class  value{
  
  constructor () {

  }
  //签到
  async list (c) {
    let wuser = c.service.model.value
    let ulist = await wuser.list()
    c.send(ulist)
  }

  //修改表
  async put(c){
    let getvalueid=c.param.id
    let data= JSON.parse(c.body)
    let wuser =c.service.model.value
    await wuser.update(data,getvalueid)
  }

  async post(c){
    let data=JSON.parse(c.body)
    let wuser =c.service.model.value
    await wuser.insert(data)

  }
}
module.exports=value